public class Student {
    private String name;
    private String gender;
    private int age;
    private String stuNum;//学号
    public static String className = "一班";

    public Student(String name, String gender, int age, String stuNum) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.stuNum = stuNum;
    }

    public static void setClassName(String className) {
        Student.className = className;
    }

    public void show(){
        System.out.println("姓名" + this.name + "年龄" + this.age + "学号" + this.stuNum);
        getClassName();
    }

    public static String getClassName() {
        Student student = new Student("lisi","nan",10,"1111");
        student.show();
        return className;
    }

    public static void main(String[] args) {
        Student.className = "一班";
        Student student1 = new Student("张三","男",10,"111");
        Student student2 = new Student("李四","男",11,"112");
        Student student3 = new Student("王五","男",12,"113");
        System.out.println(student3.className);
        student1.className = "二班";
    }
}
